/*
 * @Author: your name
 * @Date: 2022-03-16 11:21:28
 * @LastEditTime: 2022-03-16 20:31:40
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \blog_web\src\api\third.js
 */

// 以下接口来自第三方数据平台  https://www.tianapi.com/list/0_14  'http://api.tianapi.com/guonei/index?key=f097e96a808acb665e81453cd076e433'
import axios from 'axios'

let newsUrl = 'http://api.tianapi.com/guonei/index'
let key = 'f097e96a808acb665e81453cd076e433'

// 获取国内的新闻
export const getDomesticNews = (options = {}) => {
  return axios({
    url: newsUrl,
    params: {
      key,
      ...options
    }
  })
}

// 早安心语的接口
export const getMorning = (options = {}) => {
  return axios({
    url: 'http://api.tianapi.com/zaoan/index',
    params: {
      key,
      ...options
    }
  })
}
